//
//  BESideMenuHeader.swift
//  BEGlobalOiler
//
//  Created by KKING on 16/8/30.
//  Copyright © 2016年 Bullseye Energy pte ltd. All rights reserved.
//

import UIKit

class BESideMenuHeader: UIView {    
    
    @IBOutlet weak var userNameTF: UILabel!
    @IBOutlet weak var iconImgView: UIImageView!
    
    class func header()->UIView {
        return Bundle.main.loadNibNamed("BESideMenuHeader", owner: nil, options: nil)!.last as! UIView
    }
    
    

    override func awakeFromNib() {
        super.awakeFromNib()
        
        userNameTF.text = BEAccountModel.shareAccount()?.username ?? "Please Login"
        
    }
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        _ = isLogin()
    }

    
}
